package com.marvels.loanapply.customer.service;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.ibatis.annotations.Param;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import com.github.pagehelper.PageInfo;
import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.loanapply.customer.dto.LoanCustomerParamsDTO;
import com.marvels.loanapply.customer.dto.LoanCustomerResultDTO;
import com.marvels.loanapply.customer.dto.SmsTemplateNew;
import com.marvels.loanapply.dto.CmFakeInfoDTO;
import com.marvels.loanapply.dto.NotBorrowedDto;

/**
 * 贷款用户管理
 * @author 吴俊峰
 */
public interface LoanCustomerService {
	
	/**
	 * 查看贷款用户列表
	 * @param loanCustomerParamsDTO
	 * @return
	 */
	List<LoanCustomerResultDTO> queryLoanCustomerList(LoanCustomerParamsDTO loanCustomerParamsDTO) throws MarvelsBusinessException;
	
	/**
	 * 下载用户列表
	 * @param param
	 * @param request
	 * @param response
	 * @return
	 * @throws MarvelsBusinessException
	 * @throws IOException
	 */
	HSSFWorkbook downloadCustomerListExcel(LoanCustomerParamsDTO loanCustomerParamsDTO,HttpServletRequest request, HttpServletResponse response) throws MarvelsBusinessException, IOException;
	
	/**
	 * 发送短信
	 * @param loanCustomerParamsDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	Boolean sendMsg(LoanCustomerParamsDTO loanCustomerParamsDTO) throws MarvelsBusinessException;
	
	/**
	 * 获取短信模板
	 * @return
	 * @throws MarvelsBusinessException
	 */
	SmsTemplateNew getSmsTemplateNew() throws MarvelsBusinessException;
	
	/**
	 * 通过短信模板id查询短信
	 * @param id
	 * @return
	 * @throws MarvelsBusinessException
	 */
	String getSmsTemplate(@Param("id") long id) throws MarvelsBusinessException;
	
	/**
	 * 获取贷款客户详情
	 * @param loanCustomerParamsDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	LoanCustomerResultDTO getLoanCustomerInfo(LoanCustomerParamsDTO loanCustomerParamsDTO) throws MarvelsBusinessException;
	/**
	 * 查询黑名单用户
	 * @param pageNo
	 * @param pageSize
	 * @param userName
	 * @param mobile
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public PageInfo<CmFakeInfoDTO> getCmFakeInfoList(Integer pageNo,Integer pageSize, String userName, String mobile) throws MarvelsBusinessException;
	/**
	 * 修改用户黑名单状态
	 * 返回行数
	 * @param icNumber
	 * @param status
	 */
	public int updateCmFakeInfoStatus(CmFakeInfoDTO dto);
	
	
	List<NotBorrowedDto> selectNotBorrowedList(LoanCustomerParamsDTO  dto);
	
	List<NotBorrowedDto> selectVerifyNotBorrowedList(LoanCustomerParamsDTO  dto);
	
	public List<NotBorrowedDto> selectVerifyNotBorrowedListWithoutPagesub(LoanCustomerParamsDTO  dto);
	
	List<NotBorrowedDto> selectNotBorrowedListWithoutPagesub(LoanCustomerParamsDTO  dto);
	
	public HSSFWorkbook getNotBorrowedListExcel(List<NotBorrowedDto> list);
	
	public void sendNotBorrowedMsg(String mobileList);
	
	public void allowReEntry(LoanCustomerParamsDTO dto);

}
